template<unsigned SZ>
class MatrixBase< SZ >
Square matrices of small dimensions.
The matrice's elements are stored in a one dimensional array to be compatible with FORTRAN routines Matrices for small dimensions: 1 2 or 3 can be used to represent transformations of the Vector class
|
|
| MatrixBase () |
| | The default creator does not initialize.
|
| |
|
virtual | ~MatrixBase () |
| | The default destructor does nothing.
|
| |
|
| MatrixBase (real v[SZ][SZ]) |
| | Copy-creator from a C-style array.
|
| |
|
| MatrixBase (real v[SZ *SZ]) |
| | Copy-creator from a Fortran-style array.
|
| |
|
void | makeZero () |
| | set all components to zero
|
| |
|
void | makeIdentity () |
| | set to Identity (ones on the diagonal, zero elsewhere)
|
| |
|
| operator real * () |
| | conversion to a modifiable real array
|
| |
|
real & | operator() (const unsigned ii, const unsigned jj) |
| | access to modifiable elements of the matrix by (line, column)
|
| |
|
real & | operator[] (const unsigned ii) |
| | access to modifiable elements by index in the array
|
| |
|
void | getColumn (const unsigned jj, real vec[SZ]) const |
| | extract column vector at index jj
|
| |
|
void | setColumn (const unsigned jj, const real vec[SZ]) |
| | set column vector at index jj
|
| |
|
void | getLine (const unsigned ii, real vec[SZ]) const |
| | extract line vector at index ii
|
| |
|
void | setLine (const unsigned ii, const real vec[SZ]) |
| | set line vector at index ii
|
| |
|
MatrixBase | transposed () const |
| | return the transposed matrix
|
| |
|
void | transpose () |
| | transpose this matrix
|
| |
|
real | determinant () const |
| | return the determinant of the matrix
|
| |
|
MatrixBase | inverted () const |
| | return the inverse of the matrix
|
| |
|
void | inverse () |
| | replace by the inverse
|
| |
|
real | maxNorm () const |
| | maximum of all fabs(element)
|
| |
|
void | write (std::ostream &os) const |
| | formatted output
|
| |
|
real | maxDeviationFromRotation () const |
| | calculate a distance to the subspace of rotations = maxNorm( M'*M - Id )
|
| |
|
void | operator*= (const real a) |
| | multiply the matrix by the real scalar a
|
| |
|
void | operator/= (const real a) |
| | divide the matrix by the real scalar a
|
| |
|
void | operator+= (const MatrixBase m) |
| | add matrix m
|
| |
|
void | operator-= (const MatrixBase m) |
| | subtract matrix m
|
| |
|
void | vecMul (const real *in, real *out) const |
| | Vector multiplication: out <- M * in.
|
| |
|
void | vecMul (real *vec) const |
| | Vector multiplication: vec <- M * vec.
|
| |